package com.center.biz.impl;

import com.center.api.model.EduQuestionsTagRelation;
import com.center.api.remote.RemoteEduQuestionsTagRelationService;
import com.center.biz.dao.EduQuestionsTagRelationMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(version = "1.0",interfaceClass = RemoteEduQuestionsTagRelationService.class)
public class RemoteEduQuestionsTagRelationServiceImpl implements RemoteEduQuestionsTagRelationService {

    @Autowired
    private EduQuestionsTagRelationMapper eduQuestionsTagRelationMapper;

    @Override
    public int save(EduQuestionsTagRelation eduQuestionsTagRelation) {
        return eduQuestionsTagRelationMapper.insertSelective(eduQuestionsTagRelation);
    }

    @Override
    public int update(EduQuestionsTagRelation eduQuestionsTagRelation) {
        return eduQuestionsTagRelationMapper.updateByPrimaryKeySelective(eduQuestionsTagRelation);
    }

    @Override
    public int delete(int id) {
        return eduQuestionsTagRelationMapper.deleteByPrimaryKey(id);
    }

    @Override
    public List<EduQuestionsTagRelation> select(EduQuestionsTagRelation eduQuestionsTagRelation) {
        return null;
    }

    @Override
    public EduQuestionsTagRelation getById(int id) {
        return eduQuestionsTagRelationMapper.selectByPrimaryKey(id);
    }
}
